<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>width calc属性实现三栏布局</title>
    <style>
        .container::after {
            content: '';
            clear: both
        }

        .left,
        .main,
        .right {
            float: left;
            min-height: 200px
        }

        .left {
            background: red;
            width: 300px;
        }

        .main {
            background: yellow;
            width: calc(100% - 500px);
        }

        .right {
            background: green;
            width: 200px;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="left">左边</div>
        <div class="main">中间</div>
        <div class="right">右边</div>
    </div>

</body>

</html>